package com.evon.yardmanagement.service;

import java.util.List;

import com.evon.yardmanagement.dao.TransporterDAO;
import com.evon.yardmanagement.model.Transporter;

/**
 * Service class for interacting with transporter data.
 * 
 * @author vgaurav
 * 
 */
public class TransporterService {
	private TransporterDAO transporterDAO = new TransporterDAO();

	public List<Transporter> getTransporterList(int yardId) {
		return transporterDAO.findByProperty("yardId", yardId);
	}

	public Transporter getTransporterDetails(int transporterId) {
		return transporterDAO.findById(transporterId);
	}

	
	public void addTransporter(Transporter transientTransporter) {
		transporterDAO.saveOrUpdate(transientTransporter);
	}

}
